const {yy,usermodel,sortstore0a,token,comment,titlemodel,queschildstoremodel} = require('../model/model');




const addcomment=postdate=>{
	

	    let admin=new comment(postdate)

		

		 return admin.save().then(res=>{return res})
		 }






  const commentfind=()=>{
	 return comment.find().populate('uid').populate('tittleid').exec(); }

  const commentfindbyid=(id)=>{
	 return comment.find(id).populate('uid').exec().then(res=>{return res}); }



module.exports={
	addcomment, commentfind,commentfindbyid
}
